<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>

<body>
<?php  include 'action/session_check.php'; //登录判断  ?>  
<form action="action/recruit_update_do.php" method="post" >
<?php   
if($_GET["r_id"] !="" ) 
{
  require_once("../conn/conn_db.php");  //包含数据库连接文件 
  $rid = $_GET["r_id"];     //获取传递的管理员编号
  $sql = "select * from recruit_info where r_id=".$rid;  //查询语句
  $result = $conn->query($sql);                 //执行SQL语句
  //遍历查询结果的每一行
  if ($result->num_rows > 0) {
      $row = $result->fetch_assoc(); 
  $parentid2 = $row["rt_id"];  //将类别编号赋值给变量$parentid2,用于定位所属类别下拉框的选中项
?>
<table>
  <tr><td colspan="2">编辑招聘信息</td></tr>
  <tr>
     <td><font color="red">*</font>职位类别</td>
     <td><?php include 'select_recruittype3.php';?></td>
  </tr>
  <tr>
     <td><font color="red">*</font>职位名称：</td>
     <td><input type="text" name="txt_name" value="<?php echo $row['r_name'] ?>"/></td>
  </tr>
  <tr>
     <td>工作地区</td>
     <td> <textarea name="txt_city"><?php echo $row['r_city'] ?></textarea>
     </tD>
  </tr>
  <tr>
     <td><font color="red">*</font>职位描述： </td>
     <td><textarea id="txt_describe" name="txt_describe" rows="8" cols="47"><?php echo $row['r_describe'] ?></textarea></td>
  </tr>
  <tr>
    <td colspan="2">
     <input type="hidden" name="txt_id" value="<?php echo $row['r_id'] ?>"/>
     <input type="submit" value="保存" />
     <input type="button" value="返回" onClick="javascript:history.back();" />
    </td>
  </tr>
    <tr>
    <td colspan="2"></td>
  </tr> 
</table>
<?php 
 }
}
 else 
 {
   echo "<script>alert('请选择要编辑的招聘信息！');self.location='recruit_manager.php'</script>";     
 }
 ?>
</form>
</body>
</html>